package com.shlh.saas.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 邮件发送记录实体类
 */
@Data
@TableName("email_send_records")
public class EmailSendRecord {
    
    /**
     * 记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;
    
    /**
     * 用户手机号
     */
    @TableField("phone")
    private String phone;
    
    /**
     * 邮件主题
     */
    @TableField("subject")
    private String subject;
    
    /**
     * 发件人邮箱
     */
    @TableField("sender")
    private String sender;
    
    /**
     * 收件人邮箱(多个用分号分隔)
     */
    @TableField("recipients")
    private String recipients;
    
    /**
     * 邮件内容
     */
    @TableField("content")
    private String content;
    
    /**
     * 附件名称(多个用分号分隔)
     */
    @TableField("attachments")
    private String attachments;
    
    /**
     * 邮件状态(0-发送中,1-已发送,2-发送失败)
     */
    @TableField("status")
    private Integer status;
    
    /**
     * 发送时间
     */
    @TableField("send_time")
    private LocalDateTime sendTime;
    
    /**
     * 送达数量
     */
    @TableField("delivery_count")
    private Integer deliveryCount;
    
    /**
     * 阅读数量
     */
    @TableField("read_count")
    private Integer readCount;
    
    /**
     * 是否群发(0-否,1-是)
     */
    @TableField("is_group_send")
    private Integer isGroupSend;
    
    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;
    
    /**
     * 更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;
    
    /**
     * 是否删除(0-否,1-是)
     */
    @TableField("is_deleted")
    private Integer isDeleted;
    
    /**
     * 定时发送时间
     */
    @TableField("scheduled_time")
    private LocalDateTime scheduledTime;
} 